function y=rank_order(x)
% function y=rank_order(x)
% returns the rank order of values in x
% does not average for ties like tiedrank does
% see tiedrank.m
% bcoe

% x=round(rand(500,1)*100+200)

y=zeros(size(x));
uni_x=unique(x);
for i=1:length(uni_x)
    y(x==uni_x(i))=i;
end

% [x y]

